home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
yerk
/
mps231ss.hqx
/
Mops source
/
More classes
/
MW documents
/
MWtest
< prev
next >
Wrap
Text File
|
1990-02-28
|
2KB
|
75 lines
\ Test code for MW docs.
need MWdocs
:f I/O_ERR 3 beep ." I/O Error " .s quit ;f \ *** TESTING
file+ FF
0 value SV_VREF
: QQIN
ff -> theFcb
new: fmt_run new: para_run new: text
new: style_names
MWDOC_TYPE 'type TEXT 2
\ thedoc %open: ff 0EXIT
\ true fixup: thedoc drop
stdget: ff 0EXIT
getVref: ff -> sv_vref
open: ff OK?
ff bring: thedoc
close: ff OK?
true fixup: thedoc drop
mystery?
IF 3 beep ." Mystery - code:" unprocessed_code . THEN
;
scon $EH "--x" & x $ 10 instead
scon $OH "--x" & x $ 11 instead
scon $EF "--x" & x $ 12 instead
scon $OF "--x" & x $ 13 instead
scon $1H "--x" & x $ 14 instead
scon $1F "--x" & x $ 15 instead
scon $END "--x" & x $ 16 instead
scon $GR "--x" & x 1 instead
scon $SECT "--x" & x $ C instead
: HF
true -> facing_pages?
" \eh" $EH replAll: text
" \oh" $OH replAll: text
" \ef" $EF replAll: text
" \of" $OF replAll: text
" \1h" $1H replAll: text
" \1f" $1F replAll: text
" \xx" $END replAll: text
" \gr" $GR replAll: text
" \se" $SECT replAll: text ;
: QQOUT
'type WDBN 'type MSWD " Save mw 3.0 doc" getName: ff
\ 'type WDBN 'type WORD " Save mw 1.05 doc" getName: ff
swap over pad swap cmove dup pad + & x swap c!
pad swap 1+
name: ff 2drop
sv_vref setVref: ff
thedoc create&save: ff
\ stdput: ff 0EXIT create: ff OK? set: ff
\ ff send: thedoc
\ thedoc %saveAs: ff drop
;
: TEST
qqin qqout ;
: ZZ release: fmt_run release: para_run release: text
release: style_names release: tmp
release: thefile release: changes
release: fmt_ov_str release: fmt_ov_run
release: para_ov_str release: sect_offsets release: sect_ov_str
release: buf release: buf_offsets
release: fmt_blk#s release: para_blk#s
close: ff drop
;